package com.merlin.security.demo.web.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.annotation.JsonView;
import com.merlin.security.demo.web.dto.UserJson;

@RestController
public class UserJsonController {

	
	@GetMapping("/getSimpleUser")
	@JsonView(UserJson.UserSimpleView.class)
	public UserJson getSimpleUser() {
		UserJson uj = new UserJson();
		uj.setUsername("merlin");
		uj.setPassword("123456");
		return uj;
	}
	
	@GetMapping("/getDetailUser")
	@JsonView(UserJson.UserDetailView.class)
	public UserJson getDetailUser() {
		UserJson uj = new UserJson();
		uj.setUsername("merlin");
		uj.setPassword("123456");
		return uj;
	}
}
